package com.lmf.springboot.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MyController {

    @RequestMapping("/msg")
    @ResponseBody
    public String dosome(Model model){
        model.addAttribute("msg","欢迎来到Thymeleaf");
        return "userMessage";
    }
    @RequestMapping("/msg2")
    public String dosome2(Model model){
        model.addAttribute("msg","欢迎来到Thymeleaf");
        return "message";
    }
}
